package com.qf.controller;

import com.qf.common.Payment;
import com.qf.common.Result;
import com.qf.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("provider")
public class PaymentController {

    @Autowired
    PaymentService paymentService;

    @RequestMapping("findById")
    public Result findById(@RequestParam("id") Integer id){
        Payment payment = paymentService.findById(id);
        return new Result(200,"查询payment成功",payment);
    }
}
// localhost:8001/provider/findById?id=1